package com.example.securitydemo.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package: com.example.securitydemo.controller
 * @ClassName: SecurityController
 * @Author: Think
 * @CreateTime: 2021/7/27 11:57
 * @Description:
 */
@Slf4j
@RestController
public class SecurityController {

    @GetMapping({"/", "/index"})
    public String getLogin() {
        log.info("进入index");
        return "index";
    }

    @GetMapping("admin/getHello")
    public String getAdminHello(){
        return "hello admin!";
    }

    @GetMapping("manager/getHello")
    public String getManagerHello(){
        return "hello manager!";
    }

    @GetMapping("guest/getHello")
    public String getGuestHello(){
        return "hello guest!";
    }

}
